package org.example.api;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@Slf4j
@RestControllerAdvice
public class AdviceConfig {

    @ExceptionHandler(Throwable.class)
    public Object handleThrowable(Throwable e){
        log.error("", e);
        return "unCatchError";

    }

}
